package gui;

import java.awt.Graphics;
import java.awt.Image;
import java.util.ArrayList;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import sealedGenerator.*;
import sealedGenerator.card.Card;

public class ImageTest extends JPanel{
	
	public static void main(String[] args){
		JFrame frame = new JFrame();
		ArrayList<Card> cards;
		Set set = MWSPatchReader.read("new_phyrexia", "New Phyrexia", "NPH", "MUUUCCCCCCCCCCB");
		JPanel pane = new JPanel();
		JScrollPane jsp = new JScrollPane(pane);
		
		try{
			cards = set.generatePack();
			for(Card c : cards){
				JLabel cardImage = new JLabel(new ImageIcon(c.getImageURL()));
				pane.add(cardImage);
			}
		} catch(SetFormatException sfe){
			sfe.printStackTrace();
		}
		frame.add(jsp);
		frame.setSize(800, 600);
		frame.setVisible(true);
	}
}
